package com.tree.rpc.socket.consumer;

import java.lang.reflect.Proxy;

/**
 * @ClassName com.tree.rpc.socket.consumer
 * Description: <类功能描述>. <br>
 * <p>
 * <使用说明>
 * </p>
 * @Author tree
 * @Date 2019-11-07 00:45
 * @Version 1.0
 */
public class ProxyFactory {
    public static <T> T getProxyService (Class<T> interfaceClass){
        return (T)Proxy.newProxyInstance(interfaceClass.getClassLoader(),
                new Class[]{interfaceClass},new RpcInvocationHandler());
    }
}
